Skip to content

fix: null values now trigger Disallowed and NullNotAllowed checks#18

Merged
edochi merged 1 commit intomainfrom
fix/null-check-violations
Mar 17, 2026
Merged

fix: null values now trigger Disallowed and NullNotAllowed checks#18
edochi merged 1 commit intomainfrom
fix/null-check-violations

Conversation

@edochi
Copy link
Copy Markdown
Owner

@edochi edochi commented Mar 17, 2026

Summary

Null values in frontmatter were silently skipping all validation checks. Now they correctly trigger:

  • NullNotAllowed when nullable = false (regardless of required)
  • Disallowed when the field appears at a path not in allowed

Both can fire simultaneously on the same field.

WrongType is not checked for null values (null is accepted by any type).

Closes TODO-0117.

Test plan

  • 4 new tests: null on non-nullable, null on nullable, null on disallowed path, null on disallowed + non-nullable
  • 268 tests pass, clippy clean, fmt clean
  • Verified on vault: 5 NullNotAllowed violations correctly detected

@edochi edochi merged commit f674df4 into main Mar 17, 2026
6 checks passed
@edochi edochi deleted the fix/null-check-violations branch March 17, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant